package com.ljf.tijian.mapper;

import com.ljf.tijian.pojo.Cidetailedreport;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CidetailedreportMapper {
    int deleteByPrimaryKey(Integer cidrId);

    int insert(Cidetailedreport record);

    int insertSelective(Cidetailedreport record);

    Cidetailedreport selectByPrimaryKey(Integer cidrId);

    int updateByPrimaryKeySelective(Cidetailedreport record);

    int updateByPrimaryKey(Cidetailedreport record);

    @Select("select cidrId, name, unit, minrange, maxrange, " +
            "normalValue, normalValueString, type, value, \n" +
            "isError, ciId, orderId from cidetailedreport where orderId = #{orderId} and isError = 1")
    List<Cidetailedreport> selectErrorData(Integer orderId);

    @Select("select cidrId, name, unit, minrange, maxrange, " +
            "normalValue, normalValueString, type, value, \n" +
            "isError, ciId, orderId from cidetailedreport where orderId = #{orderId}")
    List<Cidetailedreport> selectReportDetailedData(Integer orderId);
}